<!DOCTYPE HTML>
<html lang="zh-CN">


<head>
    <meta charset="utf-8">
    <meta name="keywords" content="Web前端面试, c++ js">
    <meta name="description" content="分享生活,分享知识">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=no">
    <meta name="renderer" content="webkit|ie-stand|ie-comp">
    <meta name="mobile-web-app-capable" content="yes">
    <meta name="format-detection" content="telephone=no">
    <meta name="apple-mobile-web-app-capable" content="yes">
    <meta name="apple-mobile-web-app-status-bar-style" content="black-translucent">
    <!-- Global site tag (gtag.js) - Google Analytics -->


    <title>Web前端面试 | Linxueya&#39;s Blog</title>
    <link rel="icon" type="image/png" href="/medias/favicon.png">

	<link rel="stylesheet" type="text/css" href="/libs/artitalk/artitalk.min.css">
    <link rel="stylesheet" type="text/css" href="/libs/awesome/css/all.css">
	<link rel="stylesheet" type="text/css" href="https://cdn.jsdelivr.net/npm/font-awesome@latest/css/font-awesome.min.css">
    <link rel="stylesheet" type="text/css" href="/libs/materialize/materialize.min.css">
    <link rel="stylesheet" type="text/css" href="/libs/aos/aos.css">
    <link rel="stylesheet" type="text/css" href="/libs/animate/animate.min.css">
    <link rel="stylesheet" type="text/css" href="/libs/lightGallery/css/lightgallery.min.css">
    <link rel="stylesheet" type="text/css" href="/css/matery.css">
    <link rel="stylesheet" type="text/css" href="/css/my.css">

    <script src="/libs/jquery/jquery.min.js"></script>
	<script src="https://sdk.jinrishici.com/v2/browser/jinrishici.js" charset="utf-8"></script>

<meta name="generator" content="Hexo 5.3.0">
<style>.github-emoji { position: relative; display: inline-block; width: 1.2em; min-height: 1.2em; overflow: hidden; vertical-align: top; color: transparent; }  .github-emoji > span { position: relative; z-index: 10; }  .github-emoji img, .github-emoji .fancybox { margin: 0 !important; padding: 0 !important; border: none !important; outline: none !important; text-decoration: none !important; user-select: none !important; cursor: auto !important; }  .github-emoji img { height: 1.2em !important; width: 1.2em !important; position: absolute !important; left: 50% !important; top: 50% !important; transform: translate(-50%, -50%) !important; user-select: none !important; cursor: auto !important; } .github-emoji-fallback { color: inherit; } .github-emoji-fallback img { opacity: 0 !important; }</style>
<link rel="alternate" href="/atom.xml" title="Linxueya's Blog" type="application/atom+xml">
<link rel="stylesheet" href="/css/prism-tomorrow.css" type="text/css"></head>




<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/font-awesome@latest/css/font-awesome.min.css">

<style>
	 /* 春节主题模式样式开始  */
	.denglong {
		display: none;
	}
	body.themespring .denglong {
		display: block;
	}
	@media only screen and (min-width: 1124px) {
		.nav-menu {
			padding-right: 0px;
		}
		body.themespring .nav-menu {
			padding-right: 96px;
		}
	}
	@media only screen and (max-width: 760px) {
		.deng-box, .deng-box1 {
			width: 40%;
		}
		body.themespring .right {
			float: left!important;
		}
	}
	@media only screen and (min-width: 768px) and (max-width: 1024px) {
		.right {
			float: left!important;
		}
	}
	.deng-box {
		position: fixed;
		top: -40px;
		right: -20px;
		z-index: 999;
	}
	.deng-box1 {
		position: fixed;
		top: -30px;
		right: 10px;
		z-index: 999;
	}
	.deng-box1 .deng {
		position: relative;
		width: 120px;
		height: 90px;
		margin: 50px;
		background: #d8000f;
		background: rgba(216, 0, 15, 0.8);
		border-radius: 50% 50%;
		-webkit-transform-origin: 50% -100px;
		-webkit-animation: swing 5s infinite ease-in-out;
		box-shadow: -5px 5px 30px 4px rgba(252, 144, 61, 1);
	}
	.deng {
		position: relative;
		width: 120px;
		height: 90px;
		margin: 50px;
		background: #d8000f;
		background: rgba(216, 0, 15, 0.8);
		border-radius: 50% 50%;
		-webkit-transform-origin: 50% -100px;
		-webkit-animation: swing 3s infinite ease-in-out;
		box-shadow: -5px 5px 50px 4px rgba(250, 108, 0, 1);
	}
	.deng-a {
		width: 100px;
		height: 90px;
		background: #d8000f;
		background: rgba(216, 0, 15, 0.1);
		margin: 12px 8px 8px 10px;
		border-radius: 50% 50%;
		border: 2px solid #dc8f03;
	}
	.deng-b {
		width: 45px;
		height: 90px;
		background: #d8000f;
		background: rgba(216, 0, 15, 0.1);
		margin: -4px 8px 8px 26px;
		border-radius: 50% 50%;
		border: 2px solid #dc8f03;
	}
	.xian {
		position: absolute;
		top: -20px;
		left: 60px;
		width: 2px;
		height: 20px;
		background: #dc8f03;
	}
	.shui-a {
		position: relative;
		width: 5px;
		height: 20px;
		margin: -5px 0 0 59px;
		-webkit-animation: swing 4s infinite ease-in-out;
		-webkit-transform-origin: 50% -45px;
		background: #ffa500;
		border-radius: 0 0 5px 5px;
	}
	.shui-b {
		position: absolute;
		top: 14px;
		left: -2px;
		width: 10px;
		height: 10px;
		background: #dc8f03;
		border-radius: 50%;
	}
	.shui-c {
		position: absolute;
		top: 18px;
		left: -2px;
		width: 10px;
		height: 35px;
		background: #ffa500;
		border-radius: 0 0 0 5px;
	}
	.deng:before {
		position: absolute;
		top: -7px;
		left: 29px;
		height: 12px;
		width: 60px;
		content: " ";
		display: block;
		z-index: 999;
		border-radius: 5px 5px 0 0;
		border: solid 1px #dc8f03;
		background: #ffa500;
		background: linear-gradient(to right, #dc8f03, #ffa500, #dc8f03, #ffa500, #dc8f03);
	}
	.deng:after {
		position: absolute;
		bottom: -7px;
		left: 10px;
		height: 12px;
		width: 60px;
		content: " ";
		display: block;
		margin-left: 20px;
		border-radius: 0 0 5px 5px;
		border: solid 1px #dc8f03;
		background: #ffa500;
		background: linear-gradient(to right, #dc8f03, #ffa500, #dc8f03, #ffa500, #dc8f03);
	}
	@font-face {
		font-family: "华文行楷";
		src: url('/fonts/华文行楷.ttf');
	}
	.deng-t {
		font-family: 华文行楷;
		font-size: 26px;
		color: #dc8f03;
		font-weight: bold;
		line-height: 44px;
		text-align: center;
	}
	.night .deng-t,
	.night .deng-box,
	.night .deng-box1 {
		background: transparent !important;
	}
	@-moz-keyframes swing {
		0% {
				-moz-transform: rotate(-10deg)
		}
		50% {
			-moz-transform: rotate(10deg)
		}
		100% {
				-moz-transform: rotate(-10deg)
		}
	}
	@-webkit-keyframes swing {
		0% {
				-webkit-transform: rotate(-10deg)
		}
		50% {
				-webkit-transform: rotate(10deg)
		}
		100% {
				-webkit-transform: rotate(-10deg)
		}
	}
	 /* 春节主题模式样式结束  */
</style>

<body>

    <!-- 网站全局深色模式设置开始 -->
    <script>
        if (localStorage.getItem('dark') === '1') {
        document.body.classList.add('dark');
        }
        //  else if (new Date().getHours() >= 22 || new Date().getHours() < 7) {
        // document.body.classList.add('dark');
        // } 
        else if (matchMedia('(prefers-color-scheme: dark)').matches) {
        document.body.classList.add('dark');
        }
    </script>
    <a onclick="switchNightMode()" id="sma">
        <i class="fa fa-moon-o" id="nightMode" aria-hidden="true"></i>
    </a>
    <!-- 网站全局深色模式设置结束 -->

    <!-- 中国节日按钮开始 -->
    <script>
        if (localStorage.getItem('themespring') === '1') {
        document.body.classList.add('themespring');
        }
        else if (matchMedia('(prefers-color-scheme: themespring)').matches) {
        document.body.classList.add('themespring');
        }
    </script>
    <div onclick="switchSpringThemes()" id="switchspring">
        <img class="chunjiepic" src="/medias/loading.gif" data-original="/medias/spring-img/denglong.png" title="春节主题" />
    </div>
    <!-- 中国节日按钮结束  -->



    <header class="navbar-fixed">
    <nav id="headNav" class="bg-color nav-transparent">
        <div id="navContainer" class="nav-wrapper container">
            <div class="brand-logo">
                <a href="/" class="waves-effect waves-light">
                    
                    <img src="/medias/loading.gif" data-original="/medias/logo.png" class="logo-img" alt="LOGO">
                    
                    <span class="logo-span">Linxueya&#39;s Blog</span>
                </a>
            </div>
            

<a href="#" data-target="mobile-nav" class="sidenav-trigger button-collapse"><i class="fas fa-bars"></i></a>
<ul class="right nav-menu">
  
  <li class="hide-on-med-and-down nav-item">
    
    <a href="/" class="waves-effect waves-light">
      
      <i class="fas fa-home" style="zoom: 0.6;"></i>
      
      <span>首页</span>
    </a>
    
  </li>
  
  <li class="hide-on-med-and-down nav-item">
    
    <a href="" class="waves-effect waves-light">

      
      <i class="fas fa-book" style="zoom: 0.6;"></i>
      
      <span>文章</span>
      <i class="fas fa-chevron-down" aria-hidden="true" style="zoom: 0.6;"></i>
    </a>
    <ul class="sub-nav menus_item_child ">
      
      <li>
        <a href="/tags">
          
          <i class="fas fa-tag" style="margin-top: -20px; zoom: 0.6;"></i>
          
          <span>标签</span>
        </a>
      </li>
      
      <li>
        <a href="/categories">
          
          <i class="fas fa-folder-open" style="margin-top: -20px; zoom: 0.6;"></i>
          
          <span>分类</span>
        </a>
      </li>
      
      <li>
        <a href="/archives">
          
          <i class="fas fa-table" style="margin-top: -20px; zoom: 0.6;"></i>
          
          <span>归档</span>
        </a>
      </li>
      
    </ul>
    
  </li>
  
  <li class="hide-on-med-and-down nav-item">
    
    <a href="/contact" class="waves-effect waves-light">
      
      <i class="fas fa-comments" style="zoom: 0.6;"></i>
      
      <span>留言板</span>
    </a>
    
  </li>
  
  <li class="hide-on-med-and-down nav-item">
    
    <a href="/artitalk" class="waves-effect waves-light">
      
      <i class="fas fa-comments" style="zoom: 0.6;"></i>
      
      <span>说说</span>
    </a>
    
  </li>
  
  <li class="hide-on-med-and-down nav-item">
    
    <a href="" class="waves-effect waves-light">

      
      <i class="fas fa-link" style="zoom: 0.6;"></i>
      
      <span>链接</span>
      <i class="fas fa-chevron-down" aria-hidden="true" style="zoom: 0.6;"></i>
    </a>
    <ul class="sub-nav menus_item_child ">
      
      <li>
        <a href="/about">
          
          <i class="fas fa-user" style="margin-top: -20px; zoom: 0.6;"></i>
          
          <span>关于</span>
        </a>
      </li>
      
      <li>
        <a href="/friends">
          
          <i class="fas fa-address-book" style="margin-top: -20px; zoom: 0.6;"></i>
          
          <span>友链</span>
        </a>
      </li>
      
      <li>
        <a href="/box/navigate">
          
          <i class="fas fa-location-arrow" style="margin-top: -20px; zoom: 0.6;"></i>
          
          <span>导航</span>
        </a>
      </li>
      
    </ul>
    
  </li>
  
  <li class="hide-on-med-and-down nav-item">
    
    <a href="" class="waves-effect waves-light">

      
      <i class="fas fa-list" style="zoom: 0.6;"></i>
      
      <span>媒体</span>
      <i class="fas fa-chevron-down" aria-hidden="true" style="zoom: 0.6;"></i>
    </a>
    <ul class="sub-nav menus_item_child ">
      
      <li>
        <a href="/musics">
          
          <i class="fas fa-music" style="margin-top: -20px; zoom: 0.6;"></i>
          
          <span>音乐</span>
        </a>
      </li>
      
      <li>
        <a href="/video">
          
          <i class="fas fa-film" style="margin-top: -20px; zoom: 0.6;"></i>
          
          <span>视频</span>
        </a>
      </li>
      
      <li>
        <a href="/galleries">
          
          <i class="fas fa-image" style="margin-top: -20px; zoom: 0.6;"></i>
          
          <span>相册</span>
        </a>
      </li>
      
    </ul>
    
  </li>
  
  <li class="hide-on-med-and-down nav-item">
    
    <a href="" class="waves-effect waves-light">

      
      <i class="fas fa-cubes" style="zoom: 0.6;"></i>
      
      <span>实验室</span>
      <i class="fas fa-chevron-down" aria-hidden="true" style="zoom: 0.6;"></i>
    </a>
    <ul class="sub-nav menus_item_child ">
      
      <li>
        <a href="/ticktack">
          
          <i class="fas fa-clock" style="margin-top: -20px; zoom: 0.6;"></i>
          
          <span>光阴</span>
        </a>
      </li>
      
      <li>
        <a href="/box/clock">
          
          <i class="fas fa-hourglass-half" style="margin-top: -20px; zoom: 0.6;"></i>
          
          <span>流年</span>
        </a>
      </li>
      
      <li>
        <a href="/time">
          
          <i class="fas fa-clock" style="margin-top: -20px; zoom: 0.6;"></i>
          
          <span>日历</span>
        </a>
      </li>
      
    </ul>
    
  </li>
  
  <li>
    <a href="#searchModal" class="modal-trigger waves-effect waves-light">
      <i id="searchIcon" class="fas fa-search" title="搜索" style="zoom: 0.85;"></i>
    </a>
  </li>
</ul>


<div id="mobile-nav" class="side-nav sidenav">

    <div class="mobile-head bg-color">
        
        <img src="/medias/loading.gif" data-original="/medias/logo.png" class="logo-img circle responsive-img">
        
        <div class="logo-name">Linxueya&#39;s Blog</div>
        <div class="logo-desc">
            
            分享生活,分享知识
            
        </div>
    </div>

    

    <ul class="menu-list mobile-menu-list">
        
        <li class="m-nav-item">
	  
		<a href="/" class="waves-effect waves-light">
			
			    <i class="fa-fw fas fa-home"></i>
			
			首页
		</a>
          
        </li>
        
        <li class="m-nav-item">
	  
		<a href="javascript:;">
			
				<i class="fa-fw fas fa-book"></i>
			
			文章
			<span class="m-icon"><i class="fas fa-chevron-right"></i></span>
		</a>
            <ul  style="background:  ;" >
              
                <li>

                  <a href="/tags " style="margin-left:75px">
				  
				   <i class="fa fas fa-tag" style="position: absolute;left:50px" ></i>
			      
		          <span>标签</span>
                  </a>
                </li>
              
                <li>

                  <a href="/categories " style="margin-left:75px">
				  
				   <i class="fa fas fa-folder-open" style="position: absolute;left:50px" ></i>
			      
		          <span>分类</span>
                  </a>
                </li>
              
                <li>

                  <a href="/archives " style="margin-left:75px">
				  
				   <i class="fa fas fa-table" style="position: absolute;left:50px" ></i>
			      
		          <span>归档</span>
                  </a>
                </li>
              
            </ul>
          
        </li>
        
        <li class="m-nav-item">
	  
		<a href="/contact" class="waves-effect waves-light">
			
			    <i class="fa-fw fas fa-comments"></i>
			
			留言板
		</a>
          
        </li>
        
        <li class="m-nav-item">
	  
		<a href="/artitalk" class="waves-effect waves-light">
			
			    <i class="fa-fw fas fa-comments"></i>
			
			说说
		</a>
          
        </li>
        
        <li class="m-nav-item">
	  
		<a href="javascript:;">
			
				<i class="fa-fw fas fa-link"></i>
			
			链接
			<span class="m-icon"><i class="fas fa-chevron-right"></i></span>
		</a>
            <ul  style="background:  ;" >
              
                <li>

                  <a href="/about " style="margin-left:75px">
				  
				   <i class="fa fas fa-user" style="position: absolute;left:50px" ></i>
			      
		          <span>关于</span>
                  </a>
                </li>
              
                <li>

                  <a href="/friends " style="margin-left:75px">
				  
				   <i class="fa fas fa-address-book" style="position: absolute;left:50px" ></i>
			      
		          <span>友链</span>
                  </a>
                </li>
              
                <li>

                  <a href="/box/navigate " style="margin-left:75px">
				  
				   <i class="fa fas fa-location-arrow" style="position: absolute;left:50px" ></i>
			      
		          <span>导航</span>
                  </a>
                </li>
              
            </ul>
          
        </li>
        
        <li class="m-nav-item">
	  
		<a href="javascript:;">
			
				<i class="fa-fw fas fa-list"></i>
			
			媒体
			<span class="m-icon"><i class="fas fa-chevron-right"></i></span>
		</a>
            <ul  style="background:  ;" >
              
                <li>

                  <a href="/musics " style="margin-left:75px">
				  
				   <i class="fa fas fa-music" style="position: absolute;left:50px" ></i>
			      
		          <span>音乐</span>
                  </a>
                </li>
              
                <li>

                  <a href="/video " style="margin-left:75px">
				  
				   <i class="fa fas fa-film" style="position: absolute;left:50px" ></i>
			      
		          <span>视频</span>
                  </a>
                </li>
              
                <li>

                  <a href="/galleries " style="margin-left:75px">
				  
				   <i class="fa fas fa-image" style="position: absolute;left:50px" ></i>
			      
		          <span>相册</span>
                  </a>
                </li>
              
            </ul>
          
        </li>
        
        <li class="m-nav-item">
	  
		<a href="javascript:;">
			
				<i class="fa-fw fas fa-cubes"></i>
			
			实验室
			<span class="m-icon"><i class="fas fa-chevron-right"></i></span>
		</a>
            <ul  style="background:  ;" >
              
                <li>

                  <a href="/ticktack " style="margin-left:75px">
				  
				   <i class="fa fas fa-clock" style="position: absolute;left:50px" ></i>
			      
		          <span>光阴</span>
                  </a>
                </li>
              
                <li>

                  <a href="/box/clock " style="margin-left:75px">
				  
				   <i class="fa fas fa-hourglass-half" style="position: absolute;left:50px" ></i>
			      
		          <span>流年</span>
                  </a>
                </li>
              
                <li>

                  <a href="/time " style="margin-left:75px">
				  
				   <i class="fa fas fa-clock" style="position: absolute;left:50px" ></i>
			      
		          <span>日历</span>
                  </a>
                </li>
              
            </ul>
          
        </li>
        
        
    </ul>
</div>


        </div>

        
    </nav>

</header>

    



<div class="bg-cover pd-header post-cover" style="background-image: url('/medias/featureimages/7.jpg')">
    <div class="container" style="right: 0px;left: 0px;">
        <div class="row">
            <div class="col s12 m12 l12">
                <div class="brand">
                    <h1 class="description center-align post-title">Web前端面试</h1>
                </div>
            </div>
        </div>
    </div>
</div>




<main class="post-container content">

    
    <link rel="stylesheet" href="/libs/tocbot/tocbot.css">
<style>
    #articleContent h1::before,
    #articleContent h2::before,
    #articleContent h3::before,
    #articleContent h4::before,
    #articleContent h5::before,
    #articleContent h6::before {
        display: block;
        content: " ";
        height: 100px;
        margin-top: -100px;
        visibility: hidden;
    }

    #articleContent :focus {
        outline: none;
    }

    .toc-fixed {
        position: fixed;
        top: 64px;
    }

    .toc-widget {
        width: 345px;
        padding-left: 20px;
    }

    .toc-widget .toc-title {
        padding: 35px 0 15px 17px;
        font-size: 1.5rem;
        font-weight: bold;
        line-height: 1.5rem;
    }

    .toc-widget ol {
        padding: 0;
        list-style: none;
    }

    #toc-content {
        padding-bottom: 30px;
        overflow: auto;
    }

    #toc-content ol {
        padding-left: 10px;
    }

    #toc-content ol li {
        padding-left: 10px;
    }

    #toc-content .toc-link:hover {
        color: #42b983;
        font-weight: 700;
        text-decoration: underline;
    }

    #toc-content .toc-link::before {
        background-color: transparent;
        max-height: 25px;

        position: absolute;
        right: 23.5vw;
        display: block;
    }

    #toc-content .is-active-link {
        color: #42b983;
    }

    #floating-toc-btn {
        position: fixed;
        right: 15px;
        bottom: 76px;
        padding-top: 15px;
        margin-bottom: 0;
        z-index: 998;
    }

    #floating-toc-btn .btn-floating {
        width: 38px;
        height: 38px;
    }

    #floating-toc-btn .btn-floating i {
        line-height: 38px;
        font-size: 1.3rem;
    }
</style>
<div class="row">
    <div id="main-content" class="col s12 m12 l9">
        <!-- 文章内容详情 -->
<div id="artDetail">
    <div class="card">
        <div class="card-content article-info">
            <div class="row tag-cate">
                <div class="col s7">
                    
                    <div class="article-tag">
                        
                            <a href="/tags/%E9%9D%A2%E7%BB%8F/">
                                <span class="chip bg-color">面经</span>
                            </a>
                        
                    </div>
                    
                </div>
                <div class="col s5 right-align">
                    
                    <div class="post-cate">
                        <i class="fas fa-bookmark fa-fw icon-category"></i>
                        
                            <a href="/categories/%E9%9D%A2%E7%BB%8F/" class="post-category">
                                面经
                            </a>
                        
                    </div>
                    
                </div>
            </div>

            <div class="post-info">
                
                <div class="post-date info-break-policy">
                    <i class="far fa-calendar-minus fa-fw"></i>发布日期:&nbsp;&nbsp;
                    2021-03-03
                </div>
                

                
                <div class="post-date info-break-policy">
                    <i class="far fa-calendar-check fa-fw"></i>更新日期:&nbsp;&nbsp;
                    2021-03-28
                </div>
                

                
                <div class="info-break-policy">
                    <i class="far fa-file-word fa-fw"></i>文章字数:&nbsp;&nbsp;
                    3.5k
                </div>
                

                

                
                    <div id="busuanzi_container_page_pv" class="info-break-policy">
                        <i class="far fa-eye fa-fw"></i>阅读次数:&nbsp;&nbsp;
                        <span id="busuanzi_value_page_pv"></span>
                    </div>
				
            </div>
        </div>
        <hr class="clearfix">

        
        <!-- 是否加载使用自带的 prismjs. -->
        <link rel="stylesheet" href="/libs/prism/prism.css">
        

        

        <div class="card-content article-card-content">
            <div id="articleContent">
                <ol>
<li><p>手写jsonp的实现</p>
</li>
<li><p>手写链表倒数第K个查找</p>
</li>
<li><p>http请求头，请求体，cookie在哪个里面？url在哪里面？</p>
</li>
<li><p>原型链的解释</p>
</li>
<li><p>对闭包的理解，实现一个暴露内部变量，而且外部可以访问修改的函数</p>
</li>
<li><p>基本的数据类型</p>
</li>
<li><p>基本的两列自适应布局</p>
</li>
<li><p>unix中常用的命令行</p>
</li>
<li><p>OSI模型，HTTP,TCP,UDP分别在哪些层</p>
</li>
<li><p>解释平衡二叉树，以及在数据结构中的应用（红黑树）</p>
</li>
<li><p>快排的时间复杂度和空间复杂度</p>
</li>
<li><p>手写一个jQuery插件</p>
</li>
<li><p>在jquery方法和原型上面添加方法的区别和实现，以及jquery对象的实现</p>
</li>
<li><p>手写一个递归函数</p>
</li>
<li><p>对前端路由的理解？前后端路由的区别？</p>
</li>
<li><p>介绍一下webpack和gulp，以及项目中具体的使用</p>
</li>
<li><p>你对es6的了解</p>
</li>
<li><p>解释一下vue和react，以及异同点</p>
</li>
<li><p>关于平衡二叉树</p>
</li>
<li><p>前后端分离的意义以及对前端工程化的理解</p>
</li>
<li><p>使用css实现一个三角形</p>
</li>
<li><p>用promise手写ajax</p>
</li>
<li><p>手写一个类的继承，并解释一下</p>
</li>
<li><p>解释一下call函数和apply函数的作用，以及用法</p>
</li>
<li><p>你说自己抗压能力强，具体表现在哪里？</p>
</li>
<li><p>对前端前景的展望，以后前端会怎么发展</p>
</li>
<li><p>手写第一次面试没有写出来的链表问题，要求用es6写</p>
</li>
<li><p>平时是怎么学技术的？</p>
</li>
<li><p>平时大学里面时间是怎么规划的？</p>
</li>
<li><p>接下来有什么计划？这个学期和下个学期的计划是？</p>
</li>
<li><p>项目中遇到的难点，或者你学习路上的难点</p>
</li>
<li><p>你是通过什么方法和途径来学习前端的</p>
</li>
<li><p>手写一个简单遍历算法</p>
</li>
<li><p>解释一下react和vue，以及区别</p>
</li>
<li><p>你在团队中更倾向于什么角色？</p>
</li>
<li><p>对java的理解</p>
</li>
<li><p>介绍node.js，并且介绍你用它做的项目</p>
</li>
<li><p>手写一个js的深克隆</p>
</li>
<li><p>for函数里面setTimeout异步问题</p>
</li>
<li><p>手写归并排序</p>
</li>
<li><p>介绍自己的项目</p>
</li>
<li><p>实现两个数组的排序合并</p>
</li>
<li><p>手写一个原生ajax</p>
</li>
<li><p>手写一个promise版的ajax</p>
</li>
<li><p>手写实现一个promise</p>
</li>
<li><p>手写实现requireJS模块实现</p>
</li>
<li><p>手写实现jquery里面的insertAfter</p>
</li>
<li><p>react和vue的介绍以及异同</p>
</li>
<li><p>AMD和CMD，commonJS的区别</p>
</li>
<li><p>介绍一下backbone</p>
</li>
<li><p>了解过SEO吗？</p>
</li>
<li><p>低版本浏览器不支持HTML5标签怎么解决？</p>
</li>
<li><p>用js使低版本浏览器支持HTML5标签 底层是怎么实现的？</p>
</li>
<li><p>实现一个布局：左边固定宽度为200，右边自适应，而且滚动条要自动选择只出现最高的那个</p>
</li>
<li><p>画出盒子模型，要使谷歌浏览器的盒子模型显示得跟IE浏览器一致（让谷歌跟ie一致，不是ie跟谷歌一致），该怎么做？</p>
</li>
<li><p>手写JS实现类继承，讲原型链原理，并解释new一个对象的过程都发生了什么</p>
</li>
<li><p>Array对象自带的方法，一一列举</p>
</li>
<li><p>若干个数字，怎么选出最大的五个</p>
</li>
<li><p>Array对象自带的排序函数底层是怎么实现的？</p>
</li>
<li><p>常用的排序算法有哪些，介绍一下选择排序</p>
</li>
<li><p>了解navigator对象吗？</p>
</li>
<li><p>手写一个正则表达式，验证邮箱</p>
</li>
<li><p>link和@import引入CSS的区别？</p>
</li>
<li><p>刚才说有些浏览器不兼容@import，具体指哪些浏览器？</p>
</li>
<li><p>介绍一下cookie,localstorage,sessionstorage,session</p>
</li>
<li><p>jquery绑定click的方法有几种</p>
</li>
<li><p>你的优点/竞争力</p>
</li>
<li><p>移动端适配问题</p>
</li>
<li><p>react的难点在哪里</p>
</li>
<li><p>做过css动画吗</p>
</li>
<li><p>如何优化网站</p>
</li>
<li><p>以后的规划</p>
</li>
<li><p>你做过最困难的事情是啥？</p>
</li>
<li><p>css3 html5新特性</p>
</li>
<li><p>闭包，ES6，跨域</p>
</li>
<li><p>问做过啥项目，用到什么技术，遇到什么困难</p>
</li>
<li><p>兼容性</p>
</li>
<li><p>盒子模型</p>
</li>
<li><p>Array的unshift() method的作用是什么？如何连接两个Array？如何在Array里移除一个元素？</p>
</li>
<li><p>用纸笔写一个Closure，任意形式和内容</p>
</li>
<li><p>知不知道Array-like Object？</p>
</li>
<li><p>如何用Native JavaScript来读写Cookie？</p>
</li>
<li><p>知不知道CSS Box-model？</p>
</li>
<li><p>如何做一个AJAX Request？</p>
</li>
<li><p>Cross-domain access有没有了解？</p>
</li>
<li><p>前端安全方面有没有了解？XSS和CSRF如何攻防？</p>
</li>
<li><p>HTTP Response的Header里面都有些啥？</p>
</li>
<li><p>知不知道HTTP2？</p>
</li>
<li><p>输入URL后发生了什么？</p>
</li>
<li><p>new operator实际上做了什么？</p>
</li>
<li><p>面向对象的属性有哪些？</p>
</li>
<li><p>做一个两栏布局，左边fixed width，右边responsive，用纸笔手写</p>
</li>
<li><p>讲一下AJAX Request</p>
</li>
<li><p>讲一下Cross-domain access</p>
</li>
<li><p>介绍一下做过的项目</p>
</li>
<li><p>问到了多个服务器怎么弄，架构之类的</p>
</li>
<li><p>angular的渲染流程</p>
</li>
<li><p>脏检查</p>
</li>
<li><p>nodejs的架构. 优缺点. 回调</p>
</li>
<li><p>css 盒模型</p>
</li>
<li><p>css 布局，左边定宽右边自适应</p>
</li>
<li><p>冒泡和捕获，事件流哪三个阶段？</p>
</li>
<li><p>实现事件代理</p>
</li>
<li><p>原型链</p>
</li>
<li><p>继承的两种方法</p>
</li>
<li><p>ajax，原生ajax的四个过程</p>
</li>
<li><p>闭包，简单说一个闭包的应用，然后闭包的主要作用是什么</p>
</li>
<li><p>css:两个块状元素上下的margin-top和margin-bottom会重叠。啥原因？怎么解决？</p>
</li>
<li><p>js：写一个递归。就是每隔5秒调用一个自身，一共100次</p>
</li>
<li><p>cookie和session有什么区别</p>
</li>
<li><p>网络分层结构</p>
</li>
<li><p>你的不足是什么？</p>
</li>
<li><p>做了那么多项目，有没有自己的归纳总结</p>
</li>
<li><p>工程怎么进行文件管理</p>
</li>
<li><p>less和sass掌握程度</p>
</li>
<li><p>Cookie 是否会被覆盖，localStorage是否会被覆盖</p>
</li>
<li><p>事件代理js实现</p>
</li>
<li><p>Css实现动画效果</p>
</li>
<li><p>Animation还有哪些其他属性</p>
</li>
<li><p>Css实现三列布局</p>
</li>
<li><p>Css实现保持长宽比1:1</p>
</li>
<li><p>Css实现两个自适应等宽元素中间空10个像素</p>
</li>
<li><p>requireJS的原理是什么</p>
</li>
<li><p>如何保持登录状态</p>
</li>
<li><p>浮动的原理以及如何清除浮动</p>
</li>
<li><p>Html的语义化</p>
</li>
<li><p>原生js添加class怎么添加，如果本身已经有class了，会不会覆盖，怎么保留？</p>
</li>
<li><p>Jsonp的原理。怎么去读取一个script里面的数据？</p>
</li>
<li><p>如果页面初始载入的时候把ajax请求返回的数据存在localStorage里面，然后每次调用的时候去localStorage里面取数，是否可行。</p>
</li>
<li><p>304是什么意思？有没有方法不请求不经过服务器直接使用缓存</p>
</li>
<li><p>http请求头有哪些字段</p>
</li>
<li><p>数组去除一个函数。用arr.splice。又问splice返回了什么？应该返回的是去除的元素。</p>
</li>
<li><p>js异步的方法（promise，generator，async）</p>
</li>
<li><p>Cookie跨域请求能不能带上</p>
</li>
<li><p>最近看什么开源项目？</p>
</li>
<li><p>commonJS和AMD</p>
</li>
<li><p>平时是怎么学习的？</p>
</li>
<li><p>为什么要用translate3d？</p>
</li>
<li><p>对象中key-value的value怎么再放一个对象？</p>
</li>
<li><p>Get和post的区别？</p>
</li>
<li><p>Post一个file的时候file放在哪的？</p>
</li>
<li><p>说说你对组件的理解</p>
</li>
<li><p>组件的html怎么进行管理</p>
</li>
<li><p>js的异步加载，promise的三种状态，ES7中的async用过么</p>
</li>
<li><p>静态属性怎么继承</p>
</li>
<li><p>js原型链的继承</p>
</li>
<li><p>jquery和zepto有什么区别</p>
</li>
<li><p>angular的双向绑定原理</p>
</li>
<li><p>angular和react的认识</p>
</li>
<li><p>MVVM是什么</p>
</li>
<li><p>移动端是指手机浏览器，还是native，还是hybrid</p>
</li>
<li><p>你用了移动端的什么库类和框架？</p>
</li>
<li><p>移动端要注意哪些？</p>
</li>
<li><p>适配有去考虑么，retina屏幕啊？</p>
</li>
<li><p>rem是什么？em是什么？如果上一层就是根root了，em和rem等价么？</p>
</li>
<li><p>怎么测试的？会自动化测试么？</p>
</li>
<li><p>你觉得你什么技术最擅长？</p>
</li>
<li><p>你平时有没有什么技术的沉淀？</p>
</li>
<li><p>单向链表怎么查找有没有环？</p>
</li>
<li><p>怎么得到一个页面的a标签？</p>
</li>
<li><p>怎么在页面里放置一个很简单的图标，不能用img和background-img？</p>
</li>
<li><p>正则表达式判断url</p>
</li>
<li><p>怎么去除字符串前后的空格</p>
</li>
<li><p>实现页面的局部刷新</p>
</li>
<li><p>绝对定位与相对定位的区别</p>
</li>
<li><p>js轮播实现思路</p>
</li>
<li><p>使用js画一个抛物线，抛物线上有个小球随着抛物线运动，有两个按钮能使小球继续运动停止运动</p>
</li>
<li><p>java五子棋，说下实现思路</p>
</li>
<li><p>如何让各种情况下的div居中(绝对定位的div,垂直居中,水平居中)？</p>
</li>
<li><p>display有哪些值？说明他们的作用</p>
</li>
<li><p>css定义的权重</p>
</li>
<li><p>requirejs实现原理</p>
</li>
<li><p>requirejs怎么防止重复加载</p>
</li>
<li><p>ES6里头的箭头函数的this对象与其他的有啥区别</p>
</li>
<li><p>tcp/udp区别</p>
</li>
<li><p>tcp三次握手过程</p>
</li>
<li><p>xss与csrf的原理与怎么防范</p>
</li>
<li><p>mysql与 MongoDB的区别</p>
</li>
<li><p>w3c事件与IE事件的区别</p>
</li>
<li><p>有没有上传过些什么npm模块</p>
</li>
<li><p>IE与W3C怎么阻止事件的冒泡</p>
</li>
<li><p>gulp底层实现原理</p>
</li>
<li><p>webpack底层实现原理</p>
</li>
<li><p>gulp与webpack区别</p>
</li>
<li><p>vuejs与angularjs的区别</p>
</li>
<li><p>vuex是用来做什么的</p>
</li>
<li><p>说下你知道的响应状态码</p>
</li>
<li><p>ajax的过程以及 readyState几个状态的含义</p>
</li>
<li><p>你除了前端之外还会些什么？</p>
</li>
<li><p>cookie与session的区别</p>
</li>
<li><p>一些关于php与java的问题</p>
</li>
<li><p>你觉得你哪个项目是你做的最好的</p>
</li>
<li><p>说说你在项目中遇到了哪些困难,是怎么解决的</p>
</li>
<li><p>前端优化你知道哪些</p>
</li>
<li><p>webpack是用来干嘛的</p>
</li>
<li><p>webpack与gulp的区别</p>
</li>
<li><p>es6与es7了解多少</p>
</li>
<li><p>说下你知道的响应状态码</p>
</li>
<li><p>看过哪些框架的源码</p>
</li>
<li><p>遇到过哪些浏览器兼容性问题</p>
</li>
<li><p>清除浮动有哪几种方式,分别说说</p>
</li>
<li><p>你知道有哪些跨域方式,分别说说</p>
</li>
<li><p>JavaScript有哪几种类型的值</p>
</li>
<li><p>使用 new操作符时具体是干了些什么</p>
</li>
<li><p>学习前端的方法以及途径</p>
</li>
<li><p>怎么实现两个大整数的相乘，说下思路</p>
</li>
<li><p>你学过数据结构没,说说你都了解些什么</p>
</li>
<li><p>你学过计算机操作系统没,说说你都了解些什么</p>
</li>
<li><p>你学过计算机组成原理没,说说你都了解些什么</p>
</li>
<li><p>你学过算法没,说说你都了解些什么</p>
</li>
<li><p>说下选择排序,冒泡排序的实现思路</p>
</li>
<li><p>用过哪些框架</p>
</li>
<li><p>让你设计一个前端css框架你怎么做</p>
</li>
<li><p>了解哪些设计模式说说看</p>
</li>
<li><p>说下你所了解的设计模式的优点</p>
</li>
<li><p>vue源码结构</p>
</li>
<li><p>状态码</p>
</li>
<li><p>浏览器缓存的区别</p>
</li>
<li><p>304与200读取缓存的区别</p>
</li>
<li><p>http请求头有哪些,说说看你了解哪些</p>
</li>
<li><p>js中this的作用</p>
</li>
<li><p>js中上下文是什么</p>
</li>
<li><p>js有哪些函数能改变上下文</p>
</li>
<li><p>你所了解的跨域的方法都说说看你了解的？</p>
</li>
<li><p>要是让你自己写一个js框架你会用到哪些设计模式</p>
</li>
<li><p>平常在项目中用到过哪些设计模式,说说看</p>
</li>
<li><p>一来给了张纸要求写js自定义事件</p>
</li>
<li><p>前端跨域的方法</p>
</li>
<li><p>call与apply的区别</p>
</li>
<li><p>h5有个api能定位你知道是哪个吗？</p>
</li>
<li><p>vue与angularjs中双向数据绑定是怎样实现的？</p>
</li>
<li><p>webpack怎样配置？</p>
</li>
<li><p>nodejs中的文件怎么读写？</p>
</li>
<li><p>link和@import有什么区别？</p>
</li>
<li><p>cookies，sessionStorage 和 localStorage 的区别</p>
</li>
<li><p>看过哪些前端的书？平时是怎么学习的</p>
</li>
<li><p>说下你所理解的mvc与mvvc</p>
</li>
<li><p>position有哪些值,说下各自的作用</p>
</li>
<li><p>写个从几个li中取下标的闭包代码</p>
</li>
<li><p>你的职业规划是怎么样的？</p>
</li>
<li><p>移动端性能优化</p>
</li>
<li><p>lazyload如何实现</p>
</li>
<li><p>点透问题</p>
</li>
<li><p>前端安全</p>
</li>
<li><p>原生js模板引擎</p>
</li>
<li><p>repaint和reflow区别</p>
</li>
<li><p>requirejs如何避免循环依赖？</p>
</li>
<li><p>实现布局：左边一张图片，右边一段文字（不是环绕）</p>
</li>
<li><p>window.onload和$(document).ready()的区别，浏览器加载转圈结束时哪个时间点？</p>
</li>
<li><p>form表单当前页面无刷新提交 target iframe</p>
</li>
<li><p>setTimeout和setInterval区别，如何互相实现？</p>
</li>
<li><p>如何避免多重回调—promise，promise简单描述一下，如何在外部进行resolve()</p>
</li>
<li><p>margin坍塌？水平方向会不会坍塌？</p>
</li>
<li><p>伪类和伪元素区别</p>
</li>
<li><p>vue如何实现父子组件通信，以及非父子组件通信</p>
</li>
<li><p>数组去重</p>
</li>
<li><p>使用flex布局实现三等分，左右两个元素分别贴到左边和右边，垂直居中</p>
</li>
<li><p>平时如何学前端的，看了哪些书，关注了哪些公众号</p>
</li>
<li><p>实现bind函数</p>
</li>
<li><p>数组和链表区别，分别适合什么数据结构</p>
</li>
<li><p>对mvc的理解</p>
</li>
<li><p>描述一个印象最深的项目，在其中担任的角色，解决什么问题</p>
</li>
<li><p>http状态码。。。401和403区别？</p>
</li>
<li><p>描述下二分查找</p>
</li>
<li><p>为什么选择前端，如何学习的，看了哪些书，《js高级程序设计》和《你不知道的js》有什么区别，看书，看博客，看公众号三者的时间是如何分配的？</p>
</li>
<li><p>如何评价BAT？</p>
</li>
<li><p>描述下在实习中做过的一个项目，解决了什么问题，在其中担任了什么角色？这个过程存在什么问题，有什么值得改进的地方？</p>
</li>
<li><p>如何看待加班，如果有个项目需要连续一个月加班，你怎么看？</p>
</li>
<li><p>遇到的压力最大的一件事是什么？如何解决的？</p>
</li>
<li><p>平时有什么爱好</p>
</li>
<li><p>自身有待改进的地方</p>
</li>
<li><p>n长的数组放入n+1个数，不能重复，找出那个缺失的数</p>
</li>
<li><p>手里有什么offer</p>
</li>
<li><p>你对于第一份工作最看重的三个方面是什么？</p>
</li>
<li><p>如何评价现在的前端？</p>
</li>
<li><p>用原生js实现复选框选择以及全选非全选功能</p>
</li>
<li><p>用4个颜色给一个六面体上色有多少种情况</p>
</li>
<li><p>amd和cmd区别</p>
</li>
<li><p>为什么选择前端，移动端性能优化</p>
</li>
<li><p>vue的特点？双向数据绑定是如何实现的</p>
</li>
<li><p>Object.defineProperty</p>
</li>
<li><p>算法题：数组去重，去除重复两次以上的元素，代码题：嵌套的ul-li结构，根据input中输入的内容，去除相应的li节点，且如果某个嵌套的ul下面的li都被移除，则该ul的父li节点也要被移除</p>
</li>
<li><p>页面加载过程</p>
</li>
<li><p>浏览器如何实现图片缓存</p>
</li>
</ol>

                
            </div>
            <hr/>

            

    <div class="reprint" id="reprint-statement">
        
            <div class="reprint__author">
                <span class="reprint-meta" style="font-weight: bold;">
                    <i class="fas fa-user">
                        文章作者:
                    </i>
                </span>
                <span class="reprint-info">
                    <a href="/about" rel="external nofollow noreferrer">linxueya</a>
                </span>
            </div>
            <div class="reprint__type">
                <span class="reprint-meta" style="font-weight: bold;">
                    <i class="fas fa-link">
                        文章链接:
                    </i>
                </span>
                <span class="reprint-info">
                    <a href="http://linxueya.github.io/post/82dc1122.html">http://linxueya.github.io/post/82dc1122.html</a>
                </span>
            </div>
            <div class="reprint__notice">
                <span class="reprint-meta" style="font-weight: bold;">
                    <i class="fas fa-copyright">
                        版权声明:
                    </i>
                </span>
                <span class="reprint-info">
                    本博客所有文章除特別声明外，均采用
                    <a href="https://creativecommons.org/licenses/by/4.0/deed.zh" rel="external nofollow noreferrer" target="_blank">CC BY 4.0</a>
                    许可协议。转载请注明来源
                    <a href="/about" target="_blank">linxueya</a>
                    !
                </span>
            </div>
        
    </div>

    <script async defer>
      document.addEventListener("copy", function (e) {
        let toastHTML = '<span>复制成功，请遵循本文的转载规则</span><button class="btn-flat toast-action" onclick="navToReprintStatement()" style="font-size: smaller">查看</a>';
        M.toast({html: toastHTML})
      });

      function navToReprintStatement() {
        $("html, body").animate({scrollTop: $("#reprint-statement").offset().top - 80}, 800);
      }
    </script>



            <div class="tag_share" style="display: block;">
                <div class="post-meta__tag-list" style="display: inline-block;">
                    
                        <div class="article-tag">
                            
                                <a href="/tags/%E9%9D%A2%E7%BB%8F/">
                                    <span class="chip bg-color">面经</span>
                                </a>
                            
                        </div>
                    
                </div>
                <div class="post_share" style="zoom: 80%; width: fit-content; display: inline-block; float: right; margin: -0.15rem 0;">
                    <link rel="stylesheet" type="text/css" href="/libs/share/css/share.min.css">
<div id="article-share">

    
    <div class="social-share" data-sites="twitter,facebook,google,qq,qzone,wechat,weibo,douban,linkedin" data-wechat-qrcode-helper="<p>微信扫一扫即可分享！</p>"></div>
    <script src="/libs/share/js/social-share.min.js"></script>
    

    

</div>

                </div>
            </div>
            
                <style>
    #reward {
        margin: 40px 0;
        text-align: center;
    }

    #reward .reward-link {
        font-size: 1.4rem;
        line-height: 38px;
    }

    #reward .btn-floating:hover {
        box-shadow: 0 6px 12px rgba(0, 0, 0, 0.2), 0 5px 15px rgba(0, 0, 0, 0.2);
    }

    #rewardModal {
        width: 320px;
        height: 350px;
    }

    #rewardModal .reward-title {
        margin: 15px auto;
        padding-bottom: 5px;
    }

    #rewardModal .modal-content {
        padding: 10px;
    }

    #rewardModal .close {
        position: absolute;
        right: 15px;
        top: 15px;
        color: rgba(0, 0, 0, 0.5);
        font-size: 1.3rem;
        line-height: 20px;
        cursor: pointer;
    }

    #rewardModal .close:hover {
        color: #ef5350;
        transform: scale(1.3);
        -moz-transform:scale(1.3);
        -webkit-transform:scale(1.3);
        -o-transform:scale(1.3);
    }

    #rewardModal .reward-tabs {
        margin: 0 auto;
        width: 210px;
    }

    .reward-tabs .tabs {
        height: 38px;
        margin: 10px auto;
        padding-left: 0;
    }

    .reward-content ul {
        padding-left: 0 !important;
    }

    .reward-tabs .tabs .tab {
        height: 38px;
        line-height: 38px;
    }

    .reward-tabs .tab a {
        color: #fff;
        background-color: #ccc;
    }

    .reward-tabs .tab a:hover {
        background-color: #ccc;
        color: #fff;
    }

    .reward-tabs .wechat-tab .active {
        color: #fff !important;
        background-color: #22AB38 !important;
    }

    .reward-tabs .alipay-tab .active {
        color: #fff !important;
        background-color: #019FE8 !important;
    }

    .reward-tabs .reward-img {
        width: 210px;
        height: 210px;
    }
</style>

<div id="reward">
    <a href="#rewardModal" class="reward-link modal-trigger btn-floating btn-medium waves-effect waves-light red">赏</a>

    <!-- Modal Structure -->
    <div id="rewardModal" class="modal">
        <div class="modal-content">
            <a class="close modal-close"><i class="fas fa-times"></i></a>
            <h4 class="reward-title">你的赏识是我前进的动力</h4>
            <div class="reward-content">
                <div class="reward-tabs">
                    <ul class="tabs row">
                        <li class="tab col s6 alipay-tab waves-effect waves-light"><a href="#alipay">支付宝</a></li>
                        <li class="tab col s6 wechat-tab waves-effect waves-light"><a href="#wechat">微 信</a></li>
                    </ul>
                    <div id="alipay">
                        <img src="/medias/loading.gif" data-original="/medias/reward/alipay.jpg" class="reward-img" alt="支付宝打赏二维码">
                    </div>
                    <div id="wechat">
                        <img src="/medias/loading.gif" data-original="/medias/reward/wechat.png" class="reward-img" alt="微信打赏二维码">
                    </div>
                </div>
            </div>
        </div>
    </div>
</div>

<script>
    $(function () {
        $('.tabs').tabs();
    });
</script>

            
        </div>
    </div>

    

    

    

    

    
        <style>
    .valine-card {
        margin: 1.5rem auto;
    }

    .valine-card .card-content {
        padding: 20px 20px 5px 20px;
    }

    #vcomments textarea {
        box-sizing: border-box;
        background: url("/medias/comment_bg.png") 100% 100% no-repeat;
    }

    #vcomments p {
        margin: 2px 2px 10px;
        font-size: 1.05rem;
        line-height: 1.78rem;
    }

    #vcomments blockquote p {
        text-indent: 0.2rem;
    }

    #vcomments a {
        padding: 0 2px;
        color: #4cbf30;
        font-weight: 500;
        text-decoration: none;
    }

    #vcomments img {
        max-width: 100%;
        height: auto;
        cursor: pointer;
    }

    #vcomments ol li {
        list-style-type: decimal;
    }

    #vcomments ol,
    ul {
        display: block;
        padding-left: 2em;
        word-spacing: 0.05rem;
    }

    #vcomments ul li,
    ol li {
        display: list-item;
        line-height: 1.8rem;
        font-size: 1rem;
    }

    #vcomments ul li {
        list-style-type: disc;
    }

    #vcomments ul ul li {
        list-style-type: circle;
    }

    #vcomments table, th, td {
        padding: 12px 13px;
        border: 1px solid #dfe2e5;
    }

    #vcomments table, th, td {
        border: 0;
    }

    table tr:nth-child(2n), thead {
        background-color: #fafafa;
    }

    #vcomments table th {
        background-color: #f2f2f2;
        min-width: 80px;
    }

    #vcomments table td {
        min-width: 80px;
    }

    #vcomments h1 {
        font-size: 1.85rem;
        font-weight: bold;
        line-height: 2.2rem;
    }

    #vcomments h2 {
        font-size: 1.65rem;
        font-weight: bold;
        line-height: 1.9rem;
    }

    #vcomments h3 {
        font-size: 1.45rem;
        font-weight: bold;
        line-height: 1.7rem;
    }

    #vcomments h4 {
        font-size: 1.25rem;
        font-weight: bold;
        line-height: 1.5rem;
    }

    #vcomments h5 {
        font-size: 1.1rem;
        font-weight: bold;
        line-height: 1.4rem;
    }

    #vcomments h6 {
        font-size: 1rem;
        line-height: 1.3rem;
    }

    #vcomments p {
        font-size: 1rem;
        line-height: 1.5rem;
    }

    #vcomments hr {
        margin: 12px 0;
        border: 0;
        border-top: 1px solid #ccc;
    }

    #vcomments blockquote {
        margin: 15px 0;
        border-left: 5px solid #42b983;
        padding: 1rem 0.8rem 0.3rem 0.8rem;
        color: #666;
        background-color: rgba(66, 185, 131, .1);
    }

    #vcomments pre {
        font-family: monospace, monospace;
        padding: 1.2em;
        margin: .5em 0;
        background: #272822;
        overflow: auto;
        border-radius: 0.3em;
        tab-size: 4;
    }

    #vcomments code {
        font-family: monospace, monospace;
        padding: 1px 3px;
        font-size: 0.92rem;
        color: #e96900;
        background-color: #f8f8f8;
        border-radius: 2px;
    }

    #vcomments pre code {
        font-family: monospace, monospace;
        padding: 0;
        color: #e8eaf6;
        background-color: #272822;
    }

    #vcomments pre[class*="language-"] {
        padding: 1.2em;
        margin: .5em 0;
    }

    #vcomments code[class*="language-"],
    pre[class*="language-"] {
        color: #e8eaf6;
    }

    #vcomments [type="checkbox"]:not(:checked), [type="checkbox"]:checked {
        position: inherit;
        margin-left: -1.3rem;
        margin-right: 0.4rem;
        margin-top: -1px;
        vertical-align: middle;
        left: unset;
        visibility: visible;
    }

    #vcomments b,
    strong {
        font-weight: bold;
    }

    #vcomments dfn {
        font-style: italic;
    }

    #vcomments small {
        font-size: 85%;
    }

    #vcomments cite {
        font-style: normal;
    }

    #vcomments mark {
        background-color: #fcf8e3;
        padding: .2em;
    }

    #vcomments table, th, td {
        padding: 12px 13px;
        border: 1px solid #dfe2e5;
    }

    table tr:nth-child(2n), thead {
        background-color: #fafafa;
    }

    #vcomments table th {
        background-color: #f2f2f2;
        min-width: 80px;
    }

    #vcomments table td {
        min-width: 80px;
    }

    #vcomments [type="checkbox"]:not(:checked), [type="checkbox"]:checked {
        position: inherit;
        margin-left: -1.3rem;
        margin-right: 0.4rem;
        margin-top: -1px;
        vertical-align: middle;
        left: unset;
        visibility: visible;
    }
</style>

<div class="card valine-card" data-aos="fade-up">
    <div class="comment_headling" style="font-size: 20px; font-weight: 700; position: relative; padding-left: 20px; top: 15px; padding-bottom: 5px;">
        <i class="fas fa-comments fa-fw" aria-hidden="true"></i>
        <span>评论</span>
    </div>
    <div id="vcomments" class="card-content" style="display: grid">
    </div>
</div>

<script src="/libs/valine/av-min.js"></script>
<script src="https://unpkg.com/valine/dist/Valine.min.js"></script>
<script>
    new Valine({
        el: '#vcomments',
        appId: 'RfvhLjKvPsj4015y8xCiasHv-MdYXbMMI',
        appKey: 'P2p6VfJ07UtTR5FkCHWGKAFn',
        notify: 'true' === 'true',
        verify: 'false' === 'true',
        visitor: 'true' === 'true',
        avatar: 'mm',
        pageSize: '10',
        lang: 'zh-cn',
        placeholder: '留下你的小脚印吧'
    });
</script>

<!--酷Q推送-->


    

    

    

    

    

<article id="prenext-posts" class="prev-next articles">
    <div class="row article-row">
        
        <div class="article col s12 m6" data-aos="fade-up">
            <div class="article-badge left-badge text-color">
                <i class="fas fa-chevron-left"></i>&nbsp;上一篇</div>
            <div class="card">
                <a href="/post/e31c83b1.html">
                    <div class="card-image">
                        
                        
                        <img src="/medias/loading.gif" data-original="/medias/featureimages/15.jpg" class="responsive-img" alt="排序算法汇总">
                        
                        <span class="card-title">排序算法汇总</span>
                    </div>
                </a>
                <div class="card-content article-content">
                    <div class="summary block-with-text">
                        
                            排序算法汇总
                        
                    </div>
                    <div class="publish-info">
                        <span class="publish-date">
                            <i class="far fa-clock fa-fw icon-date"></i>2021-03-04
                        </span>
                        <span class="publish-author">
                            
                            <i class="fas fa-bookmark fa-fw icon-category"></i>
                            
                            <a href="/categories/%E7%AE%97%E6%B3%95/" class="post-category">
                                    算法
                                </a>
                            
                            
                        </span>
                    </div>
                </div>
                
                <div class="card-action article-tags">
                    
                    <a href="/tags/%E6%8E%92%E5%BA%8F/">
                        <span class="chip bg-color">排序</span>
                    </a>
                    
                </div>
                
            </div>
        </div>
        
        
        <div class="article col s12 m6" data-aos="fade-up">
            <div class="article-badge right-badge text-color">
                下一篇&nbsp;<i class="fas fa-chevron-right"></i>
            </div>
            <div class="card">
                <a href="/post/a53d5edd.html">
                    <div class="card-image">
                        
                        
                        <img src="/medias/loading.gif" data-original="/medias/featureimages/15.jpg" class="responsive-img" alt="Web-APIs3">
                        
                        <span class="card-title">Web-APIs3</span>
                    </div>
                </a>
                <div class="card-content article-content">
                    <div class="summary block-with-text">
                        
                            BOM 浏览器对象模型
                        
                    </div>
                    <div class="publish-info">
                            <span class="publish-date">
                                <i class="far fa-clock fa-fw icon-date"></i>2021-03-03
                            </span>
                        <span class="publish-author">
                            
                            <i class="fas fa-bookmark fa-fw icon-category"></i>
                            
                            <a href="/categories/%E7%BC%96%E7%A8%8B/" class="post-category">
                                    编程
                                </a>
                            
                            
                        </span>
                    </div>
                </div>
                
                <div class="card-action article-tags">
                    
                    <a href="/tags/JS/">
                        <span class="chip bg-color">JS</span>
                    </a>
                    
                </div>
                
            </div>
        </div>
        
    </div>
</article>

</div>



<!-- 代码块功能依赖 -->
<script type="text/javascript" src="/libs/codeBlock/codeBlockFuction.js"></script>

<!-- 代码语言 -->

<script type="text/javascript" src="/libs/codeBlock/codeLang.js"></script>


<!-- 代码块复制 -->

<script type="text/javascript" src="/libs/codeBlock/codeCopy.js"></script>


<!-- 代码块收缩 -->

<script type="text/javascript" src="/libs/codeBlock/codeShrink.js"></script>


    </div>
    <div id="toc-aside" class="expanded col l3 hide-on-med-and-down">
        <div class="toc-widget card">
            <div class="toc-title"><i class="far fa-list-alt"></i>&nbsp;&nbsp;目录</div>
            <div id="toc-content"></div>
        </div>
    </div>
</div>

<!-- TOC 悬浮按钮. -->

<div id="floating-toc-btn" class="hide-on-med-and-down">
    <a class="btn-floating btn-large bg-color">
        <i class="fas fa-list-ul"></i>
    </a>
</div>


<script src="/libs/tocbot/tocbot.min.js"></script>
<script>
    $(function () {
        tocbot.init({
            tocSelector: '#toc-content',
            contentSelector: '#articleContent',
            headingsOffset: -($(window).height() * 0.4 - 45),
            collapseDepth: Number('0'),
            headingSelector: 'h2, h3, h4'
        });

        // modify the toc link href to support Chinese.
        let i = 0;
        let tocHeading = 'toc-heading-';
        $('#toc-content a').each(function () {
            $(this).attr('href', '#' + tocHeading + (++i));
        });

        // modify the heading title id to support Chinese.
        i = 0;
        $('#articleContent').children('h2, h3, h4').each(function () {
            $(this).attr('id', tocHeading + (++i));
        });

        // Set scroll toc fixed.
        let tocHeight = parseInt($(window).height() * 0.4 - 64);
        let $tocWidget = $('.toc-widget');
        $(window).scroll(function () {
            let scroll = $(window).scrollTop();
            /* add post toc fixed. */
            if (scroll > tocHeight) {
                $tocWidget.addClass('toc-fixed');
            } else {
                $tocWidget.removeClass('toc-fixed');
            }
        });

        
        /* 修复文章卡片 div 的宽度. */
        let fixPostCardWidth = function (srcId, targetId) {
            let srcDiv = $('#' + srcId);
            if (srcDiv.length === 0) {
                return;
            }

            let w = srcDiv.width();
            if (w >= 450) {
                w = w + 21;
            } else if (w >= 350 && w < 450) {
                w = w + 18;
            } else if (w >= 300 && w < 350) {
                w = w + 16;
            } else {
                w = w + 14;
            }
            $('#' + targetId).width(w);
        };

        // 切换TOC目录展开收缩的相关操作.
        const expandedClass = 'expanded';
        let $tocAside = $('#toc-aside');
        let $mainContent = $('#main-content');
        $('#floating-toc-btn .btn-floating').click(function () {
            if ($tocAside.hasClass(expandedClass)) {
                $tocAside.removeClass(expandedClass).hide();
                $mainContent.removeClass('l9');
            } else {
                $tocAside.addClass(expandedClass).show();
                $mainContent.addClass('l9');
            }
            fixPostCardWidth('artDetail', 'prenext-posts');
        });
        
    });
</script>

    

</main>




    <style>
    .youpaiyunlogo {
        height: 26px;
        display: inline-block;
        vertical-align: top;
    }
</style>


<footer class="page-footer bg-color">
    
    <div class="container row center-align" style="margin-bottom: 15px !important;">
        <div class="col s12 m8 l8 copy-right">
            Copyright&nbsp;&copy;
            
                <span id="year">2021-2022</span>
            
            <span id="year">2021</span>
            <a href="/about" target="_blank">linxueya</a>
            |&nbsp;Powered by&nbsp;<a href="https://hexo.io/" target="_blank">Hexo</a>
            |&nbsp;Theme&nbsp;<a href="https://github.com/blinkfox/hexo-theme-matery" target="_blank">Matery</a>
            <br>
			
			<a>Cloud storage</a> service and <a>CDN</a> acceleration provider
            <a href="https://www.upyun.com/?utm_source=lianmeng&utm_medium=referral" target="_blank" title="本站CDN加速/云存储由又拍云提供">
                <img src="/medias/loading.gif" data-original="/medias/youpaiyun-logo.png" class="youpaiyunlogo" />
            </a>
            <br>
			
            
            
            
            
            
            
            <span id="busuanzi_container_site_pv">
                |&nbsp;<i class="far fa-eye"></i>&nbsp;总访问量:&nbsp;<span id="busuanzi_value_site_pv"
                    class="white-color"></span>&nbsp;次
            </span>
            
            
            <span id="busuanzi_container_site_uv">
                |&nbsp;<i class="fas fa-users"></i>&nbsp;总访问人数:&nbsp;<span id="busuanzi_value_site_uv"
                    class="white-color"></span>&nbsp;人
            </span>
            
            <br>
            
            <span id="sitetime">载入运行时间...</span>
            <script>
                function siteTime() {
                    var seconds = 1000;
                    var minutes = seconds * 60;
                    var hours = minutes * 60;
                    var days = hours * 24;
                    var years = days * 365;
                    var today = new Date();
                    var startYear = "2021";
                    var startMonth = "2";
                    var startDate = "1";
                    var startHour = "0";
                    var startMinute = "0";
                    var startSecond = "0";
                    var todayYear = today.getFullYear();
                    var todayMonth = today.getMonth() + 1;
                    var todayDate = today.getDate();
                    var todayHour = today.getHours();
                    var todayMinute = today.getMinutes();
                    var todaySecond = today.getSeconds();
                    var t1 = Date.UTC(startYear, startMonth, startDate, startHour, startMinute, startSecond);
                    var t2 = Date.UTC(todayYear, todayMonth, todayDate, todayHour, todayMinute, todaySecond);
                    var diff = t2 - t1;
                    var diffYears = Math.floor(diff / years);
                    var diffDays = Math.floor((diff / days) - diffYears * 365);
                    var diffHours = Math.floor((diff - (diffYears * 365 + diffDays) * days) / hours);
                    var diffMinutes = Math.floor((diff - (diffYears * 365 + diffDays) * days - diffHours * hours) /
                        minutes);
                    var diffSeconds = Math.floor((diff - (diffYears * 365 + diffDays) * days - diffHours * hours -
                        diffMinutes * minutes) / seconds);
                    if (startYear == todayYear) {
                        document.getElementById("year").innerHTML = todayYear;
                        document.getElementById("sitetime").innerHTML = "本站已安全运行 " + diffDays + " 天 " + diffHours +
                            " 小时 " + diffMinutes + " 分钟 " + diffSeconds + " 秒";
                    } else {
                        document.getElementById("year").innerHTML = startYear + " - " + todayYear;
                        document.getElementById("sitetime").innerHTML = "本站已安全运行 " + diffYears + " 年 " + diffDays +
                            " 天 " + diffHours + " 小时 " + diffMinutes + " 分钟 " + diffSeconds + " 秒";
                    }
                }
                setInterval(siteTime, 1000);
            </script>
            
            <br>
            
        </div>
        <div class="col s12 m4 l4 social-link social-statis">
    <a href="https://github.com/linxueya" class="tooltipped" target="_blank" data-tooltip="访问我的GitHub" data-position="top" data-delay="50">
        <i class="fab fa-github"></i>
    </a>



    <a href="mailto:1462857461@qq.com" class="tooltipped" target="_blank" data-tooltip="邮件联系我" data-position="top" data-delay="50">
        <i class="fas fa-envelope-open"></i>
    </a>







    <a href="tencent://AddContact/?fromId=50&fromSubId=1&subcmd=all&uin=1462857461" class="tooltipped" target="_blank" data-tooltip="QQ联系我: 1462857461" data-position="top" data-delay="50">
        <i class="fab fa-qq"></i>
    </a>







</div>
    </div>
</footer>

<div class="progress-bar"></div>


    <!-- 搜索遮罩框 -->
<div id="searchModal" class="modal">
    <div class="modal-content">
        <div class="search-header">
            <span class="title"><i class="fas fa-search"></i>&nbsp;&nbsp;搜索</span>
            <input type="search" id="searchInput" name="s" placeholder="请输入搜索的关键字"
                   class="search-input">
        </div>
        <div id="searchResult"></div>
    </div>
</div>

<script type="text/javascript">
$(function () {
    var searchFunc = function (path, search_id, content_id) {
        'use strict';
        $.ajax({
            url: path,
            dataType: "xml",
            success: function (xmlResponse) {
                // get the contents from search data
                var datas = $("entry", xmlResponse).map(function () {
                    return {
                        title: $("title", this).text(),
                        content: $("content", this).text(),
                        url: $("url", this).text()
                    };
                }).get();
                var $input = document.getElementById(search_id);
                var $resultContent = document.getElementById(content_id);
                $input.addEventListener('input', function () {
                    var str = '<ul class=\"search-result-list\">';
                    var keywords = this.value.trim().toLowerCase().split(/[\s\-]+/);
                    $resultContent.innerHTML = "";
                    if (this.value.trim().length <= 0) {
                        return;
                    }
                    // perform local searching
                    datas.forEach(function (data) {
                        var isMatch = true;
                        var data_title = data.title.trim().toLowerCase();
                        var data_content = data.content.trim().replace(/<[^>]+>/g, "").toLowerCase();
                        var data_url = data.url;
                        data_url = data_url.indexOf('/') === 0 ? data.url : '/' + data_url;
                        var index_title = -1;
                        var index_content = -1;
                        var first_occur = -1;
                        // only match artiles with not empty titles and contents
                        if (data_title !== '' && data_content !== '') {
                            keywords.forEach(function (keyword, i) {
                                index_title = data_title.indexOf(keyword);
                                index_content = data_content.indexOf(keyword);
                                if (index_title < 0 && index_content < 0) {
                                    isMatch = false;
                                } else {
                                    if (index_content < 0) {
                                        index_content = 0;
                                    }
                                    if (i === 0) {
                                        first_occur = index_content;
                                    }
                                }
                            });
                        }
                        // show search results
                        if (isMatch) {
                            str += "<li><a href='" + data_url + "' class='search-result-title'>" + data_title + "</a>";
                            var content = data.content.trim().replace(/<[^>]+>/g, "");
                            if (first_occur >= 0) {
                                // cut out 100 characters
                                var start = first_occur - 20;
                                var end = first_occur + 80;
                                if (start < 0) {
                                    start = 0;
                                }
                                if (start === 0) {
                                    end = 100;
                                }
                                if (end > content.length) {
                                    end = content.length;
                                }
                                var match_content = content.substr(start, end);
                                // highlight all keywords
                                keywords.forEach(function (keyword) {
                                    var regS = new RegExp(keyword, "gi");
                                    match_content = match_content.replace(regS, "<em class=\"search-keyword\">" + keyword + "</em>");
                                });

                                str += "<p class=\"search-result\">" + match_content + "...</p>"
                            }
                            str += "</li>";
                        }
                    });
                    str += "</ul>";
                    $resultContent.innerHTML = str;
                });
            }
        });
    };

    searchFunc('/search.xml', 'searchInput', 'searchResult');
});
</script>

    <!-- 回到顶部按钮 -->
<div id="backTop" class="top-scroll">
    <a class="btn-floating btn-large waves-effect waves-light" href="#!">
        <i class="fas fa-arrow-up"></i>
    </a>
</div>


    <script src="/libs/materialize/materialize.min.js"></script>
    <script src="/libs/masonry/masonry.pkgd.min.js"></script>
    <script src="/libs/aos/aos.js"></script>
    <script src="/libs/scrollprogress/scrollProgress.min.js"></script>
    <script src="/libs/lightGallery/js/lightgallery-all.min.js"></script>
    <script src="/js/matery.js"></script>

    <!-- Baidu Analytics -->

<script>
    var _hmt = _hmt || [];
    (function () {
        var hm = document.createElement("script");
        hm.src = "https://hm.baidu.com/hm.js?45d88ba8823706cdc3371e8298242453";
        var s = document.getElementsByTagName("script")[0];
        s.parentNode.insertBefore(hm, s);
    })();
</script>

    <!-- Baidu Push -->

<script>
    (function () {
        var bp = document.createElement('script');
        var curProtocol = window.location.protocol.split(':')[0];
        if (curProtocol === 'https') {
            bp.src = 'https://zz.bdstatic.com/linksubmit/push.js';
        } else {
            bp.src = 'http://push.zhanzhang.baidu.com/push.js';
        }
        var s = document.getElementsByTagName("script")[0];
        s.parentNode.insertBefore(bp, s);
    })();
</script>

    
    <script src="/libs/others/clicklove.js" async="async"></script>
    
    
    <script async src="/libs/others/busuanzi.pure.mini.js"></script>
    

    

    
    <script>
        (function (i, s, o, g, r, a, m) {
            i["DaoVoiceObject"] = r;
            i[r] = i[r] || function () {
                (i[r].q = i[r].q || []).push(arguments)
            }, i[r].l = 1 * new Date();
            a = s.createElement(o), m = s.getElementsByTagName(o)[0];
            a.async = 1;
            a.src = g;
            a.charset = "utf-8";
            m.parentNode.insertBefore(a, m)
        })(window, document, "script", ('https:' == document.location.protocol ? 'https:' : 'http:') +
            "//widget.daovoice.io/widget/6984b559.js", "daovoice")
        daovoice('init', {
            app_id: "f4be4df6"
        });
        daovoice('update');
    </script>
    

    <!--腾讯兔小巢-->
    
    

    

    
    <script type="text/javascript" src="/libs/background/ribbon-dynamic.js"
        async="async"></script>
    

    
    <script src="/libs/instantpage/instantpage.js" type="module"></script>
    

    <!--心知天气-->
    <div id="tp-weather-widget"></div>
    <script>
        (function (a, h, g, f, e, d, c, b) {
            b = function () {
                d = h.createElement(g);
                c = h.getElementsByTagName(g)[0];
                d.src = e;
                d.charset = "utf-8";
                d.async = 1;
                c.parentNode.insertBefore(d, c)
            };
            a["SeniverseWeatherWidgetObject"] = f;
            a[f] || (a[f] = function () {
                (a[f].q = a[f].q || []).push(arguments)
            });
            a[f].l = +new Date();
            if (a.attachEvent) {
                a.attachEvent("onload", b)
            } else {
                a.addEventListener("load", b, false)
            }
        }(window, document, "script", "SeniverseWeatherWidget", "//cdn.sencdn.com/widget2/static/js/bundle.js?t=" +
            parseInt((new Date().getTime() / 100000000).toString(), 10)));
        window.SeniverseWeatherWidget('show', {
            flavor: "bubble",
            location: "WX4FBXXFKE4F",
            geolocation: true,
            language: "zh-Hans",
            unit: "c",
            theme: "auto",
            token: "73db93d3-c225-40d2-81f4-77a4d2fba014",
            hover: "enabled",
            container: "tp-weather-widget"
        })
    </script>



    <div class="denglong">
        <div class="deng-box">
            <div class="deng">
                <div class="xian"></div>
                <div class="deng-a">
                    <div class="deng-b"><div class="deng-t">喜迎</div></div>
                </div>
                <div class="shui shui-a"><div class="shui-c"></div><div class="shui-b"></div></div>
            </div>
        </div>
        <div class="deng-box1">
            <div class="deng">
                <div class="xian"></div>
                <div class="deng-a">
                    <div class="deng-b"><div class="deng-t">春节</div></div>
                </div>
                <div class="shui shui-a"><div class="shui-c"></div><div class="shui-b"></div></div>
            </div>
        </div>
    </div>


<script>
            window.imageLazyLoadSetting = {
                isSPA: false,
                processImages: null,
            };
        </script><script>window.addEventListener("load",function(){var t=/\.(gif|jpg|jpeg|tiff|png)$/i,r=/^data:image\/[a-z]+;base64,/;Array.prototype.slice.call(document.querySelectorAll("img[data-original]")).forEach(function(a){var e=a.parentNode;"A"===e.tagName&&(e.href.match(t)||e.href.match(r))&&(e.href=a.dataset.original)})});</script><script>!function(n){n.imageLazyLoadSetting.processImages=i;var e=n.imageLazyLoadSetting.isSPA,r=Array.prototype.slice.call(document.querySelectorAll("img[data-original]"));function i(){e&&(r=Array.prototype.slice.call(document.querySelectorAll("img[data-original]")));for(var t,a=0;a<r.length;a++)0<=(t=(t=r[a]).getBoundingClientRect()).bottom&&0<=t.left&&t.top<=(n.innerHeight||document.documentElement.clientHeight)&&function(){var t,e,n,i,o=r[a];t=o,e=function(){r=r.filter(function(t){return o!==t})},n=new Image,i=t.getAttribute("data-original"),n.onload=function(){t.src=i,e&&e()},n.src=i}()}i(),n.addEventListener("scroll",function(){var t,e;t=i,e=n,clearTimeout(t.tId),t.tId=setTimeout(function(){t.call(e)},500)})}(this);</script></body>

</html>